package com.xj.common.bussiness.broker.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

import static org.springframework.format.annotation.DateTimeFormat.ISO.DATE;

/**
 * <p>
 * 
 * </p>
 *
 * @author Hmemb
 * @since 2018-12-05
 */
@EqualsAndHashCode(callSuper=false)
@Data
@TableName("tb_broker")
public class TbBroker extends Model<TbBroker> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 姓名
     */
	@TableField(value="name")
	private String name;
    /**
     * 性别
     */
	@TableField(value="sex")
	private String sex;
    /**
     * 民族
     */
	@TableField(value="nationality")
	private String nationality;
    /**
     * 身份证号
     */
	@TableField(value="identification")
	private String identification;
    /**
     * 电话
     */
	@TableField(value="tel")
	private String tel;
    /**
     * 现住址
     */
	@TableField(value="address")
	private String address;
    /**
     * 从业时间
     */
	@TableField(value="employment_time")
	@DateTimeFormat(iso = DATE)
	private Date employmentTime;
    /**
     * 业务特长
     */
	@TableField(value="business_expertise")
	private String businessExpertise;
    /**
     * 紧急联系人
     */
	@TableField(value="emergency_contact")
	private String emergencyContact;
    /**
     * 经纪人与紧急联系人的关系
     */
	@TableField(value="relationship")
	private String relationship;
    /**
     * 紧急联系人电话
     */
	@TableField(value="emergency_contact_tel")
	private String emergencyContactTel;
    /**
     * 身份证照片
     */
	private String identityPhoto;
	/**
	 * 创建时间
	 */
	@TableField(value="create_date")
	@DateTimeFormat(iso = DATE)
	private Date createDate;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getIdentification() {
		return identification;
	}

	public void setIdentification(String identification) {
		this.identification = identification;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getEmploymentTime() {
		return employmentTime;
	}

	public void setEmploymentTime(Date employmentTime) {
		this.employmentTime = employmentTime;
	}

	public String getBusinessExpertise() {
		return businessExpertise;
	}

	public void setBusinessExpertise(String businessExpertise) {
		this.businessExpertise = businessExpertise;
	}

	public String getEmergencyContact() {
		return emergencyContact;
	}

	public void setEmergencyContact(String emergencyContact) {
		this.emergencyContact = emergencyContact;
	}

	public String getRelationship() {
		return relationship;
	}

	public void setRelationship(String relationship) {
		this.relationship = relationship;
	}

	public String getEmergencyContactTel() {
		return emergencyContactTel;
	}

	public void setEmergencyContactTel(String emergencyContactTel) {
		this.emergencyContactTel = emergencyContactTel;
	}

	public String getIdentityPhoto() {
		return identityPhoto;
	}

	public void setIdentityPhoto(String identityPhoto) {
		this.identityPhoto = identityPhoto;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "TbBroker{" +
			"id=" + id +
			", name=" + name +
			", sex=" + sex +
			", nationality=" + nationality +
			", identification=" + identification +
			", tel=" + tel +
			", address=" + address +
			", employmentTime=" + employmentTime +
			", businessExpertise=" + businessExpertise +
			", emergencyContact=" + emergencyContact +
			", relationship=" + relationship +
			", emergencyContactTel=" + emergencyContactTel +
			", identityPhoto=" + identityPhoto +
			"}";
	}
}
